/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:26554
 * Date:2024-11-02
 * Time:17:00
 */
public class text {
    Dog dog = new Dog();
    public void setdog(int y,String m,String x){

        dog.age = y;
        dog.name = m;
        dog.color = x;
    }
    public void print(){
        System.out.println("年龄:" + dog.age + " 名字" + dog.name + " 颜色:" + dog.color);
    }
    public static void main(String[] args) {


        text t = new text();

        t.setdog(5,"小白","白色");
        t.print();


    }
}

class Dog {
    public Dog( ) {

    }

    public int getAge() {
        return age;
    }

    public Dog(int age, String name, String color) {
        this.age = age;
        this.name = name;
        this.color = color;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int age;
    public String name;
    public String color;
}